package com.zyh.A;

public class Test1 {
    public static void main(String[] args) {
        int newPhone = 7988;
        int oldPhone = 1500;
        //计算不使用以旧换新的花费
        double cost1 = newPhone - oldPhone;
        //计算使用以旧换新的花费
        double cost2 = newPhone * 0.8;
        if (cost1 > cost2) {
            System.out.println("以旧换新更便宜");
        } else {
            System.out.println("不使用以旧换新更便宜");
        }
    }
}
